home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Demos / AppMaker™ 1.5 DEMO / Demo AppMaker™ / Demo AppMaker™.rsrc / TmPT_102_App < prev    next >
Encoding:
Text File  |  1992-04-08  |  1.8 KB  |  77 lines

  1. { %filename% -- application methods }
  2. { Created %date% %time% by AppMaker }
  3.  
  4. {    This module overrides the AppMaker-generated code in z%Appname%App.%    %}
  5. {    It provides a place for you to add your own code and still be able to    }
  6. {    generate code for new changes to the user interface.  This module will    }
  7. {    not be regenerated by AppMaker unless you delete it.  Its superclass,    }
  8. {    z%Appname%App, may be regenerated to handle user interface changes%        %}
  9. {    without losing your hand-coded changes to this module.                    }
  10.  
  11. Unit %unitname%;
  12. Interface
  13.  
  14. Uses
  15.     TCL,
  16.     AMCL,
  17.     %AppName%Intf,
  18.     ResourceDefs;
  19.  
  20. {----------}
  21. Implementation
  22.  
  23. {----------}
  24. Procedure C%Appname%App.I%Appname%App;
  25. Begin
  26.     inherited I%Appname%App;
  27.  
  28.     {your application-specific initialization:}
  29.  
  30. End; {I%Appname%App}
  31.  
  32. {----------}
  33. Procedure C%Appname%App.SetUpFileParameters;
  34. Begin
  35.     inherited SetUpFileParameters;
  36.     sfNumTypes := 1;
  37.     sfFileTypes [0] := kFileType;
  38.     gSignature := kSignature;
  39. End; {SetUpFileParameters}
  40.  
  41. {----------}
  42. Procedure C%Appname%App.UpdateMenus;
  43. Begin
  44.     inherited UpdateMenus;
  45.     %for each menu gen updateAppMenus%
  46.  
  47. End; {UpdateMenus}
  48.  
  49. {----------}
  50. Procedure C%Appname%App.DoCommand    (theCommand:    longint);
  51. var
  52.     theMenu:        integer;
  53.     theItem:        integer;
  54.     theItemText:    Str255;
  55. Begin
  56.     if theCommand < 0 then begin                {menu generated dynamically}
  57.         theMenu := HiWord (-theCommand);
  58.         if theMenu = MENUapple then begin
  59.             inherited DoCommand (theCommand);    {handle Apple menu in superclass}
  60.         end else begin
  61.             theItem := LoWord (-theCommand);
  62.             GetItem (GetMHandle (theMenu), theItem, theItemText);
  63.             {do the right thing with the text of the item}
  64.         end;
  65.     end else begin
  66.         case theCommand of
  67.             0:    ;
  68.             %for each menu gen handleAppItems%
  69.  
  70.             otherwise
  71.                 inherited DoCommand (theCommand);
  72.         end; {case}
  73.     end;
  74. End; {DoCommand}
  75.  
  76. End. {%unitname%}
  77.